﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;

namespace worcWithFile
{
    class Program
    {
        static void Main(string[] args)
        {

            for (int i = 0; i < 10; i++)
            {
                string str = "Какой-то текст бля бла бла!!!";
                byte[] by =  GetByteFromString(str);
                FileInfo f = new FileInfo(@"E:\Какашка\name" + i + ".txt");
                FileStream fs = f.Create();
                fs.Write(by,0,by.Length);
                fs.Close();
            }          

            
        }

        public static byte[] GetByteFromString(string st)
        {
            return Encoding.UTF8.GetBytes(st);
        }

        public static String GetStringFromBytes(byte[] b)
        {
            return Encoding.ASCII.GetString(b);
        }

    }
}
